all: bare.elf bare.bin

main.o: main.c
	$(CROSS_COMPILE)gcc -g3 -c $< -o $@

startup.o: startup.S
	$(CROSS_COMPILE)as -g3 -c $< -o $@

bare.elf: main.o startup.o
	$(CROSS_COMPILE)ld -Tbare.ld $^ -o $@

bare.bin: bare.elf
	$(CROSS_COMPILE)objcopy -O binary $< $@
